package com.example.boot17demo;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import org.springframework.scheduling.quartz.QuartzJobBean;

public class MySampleJob extends QuartzJobBean {

    // fields ...

//    private MyService myService;

    private String name;

    // Inject "MyService" bean
//    public void setMyService(MyService myService) {
//        this.myService = myService;
//    }

    // Inject the "name" job data property
    public void setName(String name) {
        this.name = name;
    }

    @Override
    protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
//        this.myService.someMethod(context.getFireTime(), this.name);
        System.out.println(name);
    }

}
